<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="admin/assets/libs/jquery/jquery-3.2.1.min.js"></script>
</head>
<body>
<img src="" id="img">
<input type="text" id="txtKey">
</body>
<script type="text/javascript">
    $.getJSON("/api/common/captcha", function (data) {
        $('#img').attr("src", data.data.img);
        $('#txtKey').attr("src", data.data.key);
    })
</script>
</html>